package com.example.personnel_oa.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.comment_oa.pojos.Jobrequirements;
import com.example.comment_oa.pojos_vo.Talentpool_vo;
import com.example.personnel_oa.mapper.JobrequirementsMapper;
import com.example.personnel_oa.service.JobrequirementsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author asus
* @description 针对表【jobrequirements】的数据库操作Service实现
* @createDate 2022-10-17 19:16:24
*/
@Service
public class JobrequirementsServiceImpl extends ServiceImpl<JobrequirementsMapper, Jobrequirements>
implements JobrequirementsService {
    @Autowired
    JobrequirementsMapper jobmapper;

    @Override
    public List<Jobrequirements> selectjob() {
        List<Jobrequirements> selectjob = jobmapper.selectjob();
        System.out.println(selectjob);
        return selectjob;
    }

    @Override
    public int countJob() {
        int i = jobmapper.countJob();
        return i;
    }

    //高级查询
    @Override
    public List<Jobrequirements> selectAlljob(Talentpool_vo talentpoolVo) {
        List<Jobrequirements> jobrequirements = jobmapper.selectAlljob(talentpoolVo);
        return jobrequirements;
    }

    //查询岗位需求记录
    @Override
    public List<Jobrequirements> fabujilu(int jobId) {
        List<Jobrequirements> fabujilu = jobmapper.fabujilu(jobId);
        return fabujilu;
    }

    @Override
    public Jobrequirements shrnqingren(int jobid) {
        Jobrequirements shrnqingren = jobmapper.shrnqingren(jobid);
        return shrnqingren;
    }

    @Override
    public int addjob(Jobrequirements job) {
        int addjob = jobmapper.addjob(job);
        return addjob;
    }
    //根据id查询发布详情页面
    @Override
    public Jobrequirements selectjobId(int jobId) {
        Jobrequirements jobrequirements = jobmapper.selectjobId(jobId);
        return jobrequirements;
    }

    //流程查看用工需求申请，根据编号查询数据
    @Override
    public Jobrequirements bianhao(String jobBianhao) {
        Jobrequirements bianhao = jobmapper.bianhao(jobBianhao);
        return bianhao;
    }

    @Override
    public int upstatus(int jobId) {
        int upstatus = jobmapper.upstatus(jobId);
        return upstatus;
    }

    @Override
    public int upJob(Jobrequirements job) {
        int i = jobmapper.upJob(job);
        return i;
    }
    //撤回功能，修改状态
    @Override
    public int upstatus2(int jobId) {
        int i = jobmapper.upstatus2(jobId);
        return i;
    }
    //重新发布功能，修改状态
    @Override
    public int upstatus3(int jobId) {
        int i = jobmapper.upstatus3(jobId);
        return i;
    }

    //关闭发布功能，修改状态
    @Override
    public int upstatus4(int jobId) {
        int i = jobmapper.upstatus4(jobId);
        return i;
    }
    //流程审批成功
    @Override
    public int jobStatus(String jobPostname, String jobBianhao) {
        int i = jobmapper.jobStatus(jobPostname, jobBianhao);
        return i;
    }

    //流程审批失败
    @Override
    public int jobStatuss(String jobPostname, String jobBianhao) {
        int i = jobmapper.jobStatuss(jobPostname, jobBianhao);
        return i;
    }
}
